#ifndef BACKGROUND_H
#define BACKGROUND_H

#include <QQuickItem>
#include <QQuickPaintedItem>

typedef struct Point {
    QPointF pos;
    QPointF movePos;
} Point;

class Background : public QQuickPaintedItem
{
    Q_OBJECT
public:
    Background(QQuickPaintedItem *parent = nullptr);

public slots:
    void init();
    void resize();
    void mousePos(int x, int y);

private:
    Point *point;
    bool m_initlized;
    QPoint offset;

    // QQuickPaintedItem interface
public:
    void paint(QPainter *painter) override;
};

#endif // BACKGROUND_H
